﻿// 常用的表单的样式
// 表单的样式
.darkContent,
.el-dialog {
  .el-input--suffix {
    display: block;
  }
  .el-input__inner,
  .el-textarea__inner {
    border-radius: 0;
    border: 1px solid $theme_form_border_color;
    color: $theme_font_color;
    line-height: 30px;
    padding: 0 0 0 10px;
    background: transparent !important;
    display: block;
  }
  
  input:-webkit-autofill{
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: $theme_font_color !important;
  }
  // 下拉菜单
  .el-select {
    display: block;
  }
  // 元数据表格编辑字段的弹窗下拉
  .edit_select>.el-input{
    display: inline-block;
    width: auto;
  }
  .el-input__inner {
    height: 32px !important;
  }
  // 修改表单的高度
  .el-form-item__content,
  .el-form-item__label {
    line-height: 32px;
    color: $theme_font_color;
  }
  .el-form-item__label {
    padding: 0 6px 0 0;
  }
  // 修改表单每一列的下边距
  .el-form-item {
    margin-bottom: 20px;
    .el-form-item{
      margin-bottom: 0;
    }
  }
  // 有下拉icon/日期icon的样式
  .el-input--prefix .el-input__inner {
    padding: 0 0 0 30px;
  }
  .el-input--medium .el-input__icon {
    line-height: 30px;
  }
  .el-input__suffix {
    right: 1px;
    height: 30px;
    .el-input__inner {
      padding: 0 25px 0 10px;
    }
  }
}
.el-input-group__prepend_row {
  .el-input-group__prepend {
    padding: 0 !important;
    border: 0;
    height: 32px;
    border-radius: 0;
    .el-input__inner {
      width: 180px;
      border-right: 0;
    }
  }
  .el-input-group__append {
    height: 32px;
  }
}
// 表单禁用的样式
.el-input.is-disabled .el-input__inner,
.el-textarea.is-disabled .el-textarea__inner {
  border: 1px solid $theme_form_disabled_border_color;
  color: $theme_font_color !important;
  background: $theme_form_disabled_bg_color;
}
// 下拉框，模拟禁用的样式
.select_disabled {
  .el-input .el-input__inner,
  .el-input.is-focus .el-input__inner {
    border: 1px solid $theme_form_disabled_border_color;
    color: $theme_font_color !important;
    background: $theme_form_disabled_bg_color;
  }
  .el-icon-close {
    display: none;
  }
  .el-select__tags-text {
    color: $theme_font_color;
  }
}
// 没有左外边距的表单
.form_noLeftMargin {
  .el-form-item__content {
    margin: 0 !important;
    text-align: center;
  }
}
// 表格内部输入框的样式
.el-table  { 
  input[readonly] {
    cursor: pointer;
  }
  // 表格内部的表单验证
  .el-form-item {
    margin-bottom: 0;
  }
  .el-form-item__content {
    margin-left: 0 !important;
  }
  .el-input .el-input__inner {
    padding: 0 !important;
    text-align: center;
    border-radius: 0;
    color: $theme_table_edit_color;
    background: transparent;
    border-color: transparent;
  }
  /* 表格内的下拉框样式 */
  .el-input__suffix {
    right: 0;
    .el-input__inner {
      padding: 0 25px 0 0;
      background: transparent;
    }
  }
  // 验证失败的样式
  .el-form-item.is-error  .el-input__inner,
  .el-form-item.is-error .el-textarea__inner {
    border-color: $theme_form_error_color;
  }
  .el-input--medium .el-input__icon {
    line-height: 22px;
  }
  .el-input.is-disabled .el-input__inner {
    color: $theme_form_disabled_font_color !important;
    cursor:default;
  }
  // 日期控件
  .el-date-editor.el-input {
    width: 100%;
  }
  .el-form-item__content .el-input-group__append {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    width: 1px;
    span{
      display: block;
      cursor: pointer;
      color: $theme_font_color;
    }
  }
}
/* 两个表单中间的横线 */
.line {
  text-align: center;
}
.my_radioGroup {
  .el-radio-button{
    .el-radio-button__inner {
      border-radius: 0;
    }
  }
  .el-radio-button--mini {
    .el-radio-button__inner {
      padding: 6px 15px;
    }
  }
}
.formItem_hadPrepend {
  .el-input-group__prepend {
    padding: 0;
    width: 60px;
    text-align: center;
  }
  .el-radio-button--mini {
    .el-radio-button__inner{
      padding: 6px 15px;
    }
  }
}
// 自定义表单时，选择必须后添加一个*号标记
.dynamic_singleRequired .el-form-item__label:before {
  content: '*';
  color: #f56c6c;
  margin-right: 4px;
}
// 编辑表单的属性
#detail_pannel {
  .el-form-item__label {
    padding: 0;
    line-height: 20px;
  }
  .el-form-item {
    margin-bottom: 10px;
  }
}
// 分组表单时---标题
.el-select-group__title {
  padding-left: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}
// 数字输入框的控件
.el-input-number--mini{
  width: 100%;
}
.el-input-number {
  line-height: 32px;
  .el-input-number__decrease,
  .el-input-number__increase {
    background-color: rgba(0, 161, 254, 0.2);
    border-color: $theme_form_border_color;
    height: 32px;
    line-height: 30px;
  }
}
// 计数器---没有控制按钮时
.el-input-number.inputNumber_noControls.is-without-controls .el-input__inner {
  padding: 0 0 0 10px;
  text-align: left;
}
// 多行文本显示限制输入的字段长度时
.el-textarea .el-input__count{
  height: 32px;
  bottom: 1px;
}
// 表单配置页面
.formItenConfig .el-form-item__content{
  line-height: 35px !important;
}
// 滑块的样式
.el-slider {
  padding-left: 10px;
  padding-right: 14px;
}
// 五星评分的样式
.el-rate {
  height: 34px;
  line-height: 34px;
  .el-rate__item {
    height: 34px;
    vertical-align: -5px;
    i {
      font-size: 24px;
    }
  }
}
// checkbox和radio的样式
.el-radio.is-checked.is-disabled {
  .el-radio__label {
    color: $theme_font_disabled_color;
  }
  .el-radio__input.is-disabled.is-checked .el-radio__inner {
    background-color: $theme_form_disabled_bg_color;
    border-color: $theme_form_disabled_border_color;
  }
}
.el-checkbox.is-checked.is-disabled {
  .el-checkbox__label {
    color: $theme_font_disabled_color;
  }
  .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
    background-color: $theme_form_disabled_bg_color;
    border-color: $theme_form_disabled_border_color;
  }
}
// 单选框组的样式
.el-radio-button {
  border-color: $theme_form_border_color;
}
.el-radio-button__inner {
  color: $theme_font_color;
  background-color: rgba(0, 161, 254, 0.2);
  border: none !important;
}
.el-radio-button__inner:hover {
  color: #fff;
}
// switch开关
.el-switch__core {
  background-color: rgba(0, 161, 254, 0.2);
  border-color: $theme_form_border_color;
}
.el-switch__label {
  color: $theme_font_color;
}
.el-form {
  overflow: hidden;
}
// 修改级联选择器的placeholder的文字颜色
.cascaderHadValue {
  input::-webkit-input-placeholder {
    color: $theme_font_color !important;
  }
  input::-moz-placeholder {
    color: $theme_font_color !important;
  }
  input:-moz-placeholder {
    color: $theme_font_color !important;
  }
  input:-ms-input-placeholder {
    color: $theme_font_color !important;
  }
  .el-input__inner {
    padding: 0 0 0 15px !important;
  }
}
.el-cascader__tags {
  .el-cascader__search-input {
    background-color: transparent !important;
    color: $theme_font_color !important;
  }
  input::-webkit-input-placeholder {
    color: transparent !important;
  }
  input::-moz-placeholder {
    color: transparent !important;
  }
  input:-moz-placeholder {
    color: transparent !important;
  }
  input:-ms-input-placeholder {
    color: transparent !important;
  }
}
.el-cascader__suggestion-item {
  color: #fff;
}
.el-cascader__suggestion-item:hover, .el-cascader__suggestion-item:focus {
  background-color: transparent;
  color: $theme_main_hover_color;
}